<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<link rel="stylesheet" th:href="@{/js/layuiadmin-1.2.1/layui/css/layui.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/js/layuiadmin-1.2.1/style/admin.css}" media="all">
    <link th:href="@{/dhecp/css/dh-icon.css?v=4}" rel="stylesheet"/>
    <link th:href="@{/dhecp/css/dh-main.css?v=1}" rel="stylesheet"/>
    <link th:href="@{/dhecp/css/bootstrap.min.css?v=1}" rel="stylesheet"/>
    <style>
      .layadmin-carousel{height: auto !important;}
      .banbody{display: flex;align-items: center;height: 92vh;}
      .item img{width: 80vw !important;height: 80vh !important;}
      .items{border-bottom: 1px solid #ddd;padding: 10px 0px;cursor: pointer;}
      .tit{font-size: 15px;font-weight: 700;color: #333;margin-bottom: 3px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
      .uinfo{display: flex;align-items: center;justify-content: space-between;color: #999;font-size: 13px;}
      .carousel-indicators li{margin-right: 3px !important;}
      .carousel-control{background-image: none !important;}
    </style>
</head>
<body>
<div class="layui-fluid" style="padding:8px">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md9"  style="padding: 7.5px 7.5px 7.5px 0;">
        <!-- <div style="text-align: center;font-size:26px;font-weight:700;color: rgb(35, 149, 224);padding: 20px 0;">逸思电商</div> -->
        <!-- <div style="padding: 0 20px;"><img style="width: 150px;" src="/img/yslogo.jpg"/></div> -->
        
        <div class="layui-row layui-col-space15">
          <div class="layui-col-md12">
            <div class="layui-card banbody">
              <div class="layui-card-body">
                <div class="layui-carousel layadmin-carousel layadmin-shortcut indexModule-bodys" >
                  <div id="myCarousel" class="carousel slide" data-ride="carousel">
                    <!-- 轮播（Carousel）指标 -->
                    <ol class="carousel-indicators">
                        
                    </ol>   
                    <!-- 轮播（Carousel）项目 -->
                    <div class="carousel-inner banimg">
                        
                    </div>
                    <!-- 轮播（Carousel）导航 -->
                    <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
                        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                        <span class="sr-only">Previous</span>
                    </a>
                    <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
                        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                        <span class="sr-only">Next</span>
                    </a>
                </div>
                </div>
              </div>
            </div>
          </div>

        </div>
      </div>
      <div class="layui-col-md3">
        <div class="layui-card">
          <div class="layui-card-header"><i class="dhicon dh-bullhorn icon icon-tip"></i>通知通告</div>
          <div class="layui-card-body layui-text" style="height: 90vh;overflow:auto;" id="notice_lists"></div>
        </div>
      </div>
    </div>
  </div>

<th:block th:include="include :: footer" />

<script th:src="@{/dhecp/js/bootstrap.min.js?v=1}"></script>
<script th:src="@{/dhecp/js/dh-main.js?v=3}"></script>
<script type="text/javascript">
layui.config({
    base: '/js/layuiadmin-1.2.1/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'console']);

//获取首页常用栏目
getIndexmodule();
// getIndexMsg('/system/indexmodule/datainfolist', 'warning', 'warning_list');
// getIndexMsg('/system/indexmodule/messagelist', 'msg', 'notice_list');
function path(nid){
    top.layui.index.openTabsPage('/oa/notice/edit?nid='+nid,'通知通告')
}
window.onload=function(){
  $.get('/business/indeximage/list',{'isOpen':'是'}, function(res){
     var str=``
     var dicon=''
    for(var i=0;i<res.data.length;i++){
      if(i==0){
        str+=`<div class="item active">
                 <img decoding="async" src="${res.data[i].imageUrl}" alt="First slide">
             </div>`
        dicon+=`<li data-target="#myCarousel" data-slide-to="${i}" class="active"></li>`
      }else{
        str+=`<div class="item">
                 <img decoding="async" src="${res.data[i].imageUrl}" alt="First slide">
             </div>`
        dicon+=`<li data-target="#myCarousel" data-slide-to="${i}"></li>`
      }
    }
    $('.banimg').html(str)
    $('.carousel-indicators').html(dicon)
      
  })

  $.get('/oa/notice/list',{'checkysx':1}, function(res){
    var html=''
    for(var i=0;i<res.data.length;i++){
      if(i==0){
        html+=`<div class="items" onclick="path(${res.data[i].nid})">
           <div class='tit'>${res.data[i].vZt}</div>
           <div class='info' style="margin:5px 0;">${res.data[i].vNr}</div>
           <div class="uinfo">
              <span>${res.data[i].cUserName}</span>
              <span>${res.data[i].updateTime}</span>
            </div>
        </div>`
      }else{
        html+=`<div class="items" onclick="path(${res.data[i].nid})">
           <div class='tit'>${res.data[i].vZt}</div>
           <div class="uinfo">
              <span>${res.data[i].cUserName}</span>
              <span>${res.data[i].updateTime}</span>
            </div>
        </div>`
      }
    }
      
    $('#notice_lists').html(html)

  })
}



</script>
</body>
</html>